<include file="common:__head__"/>
<div class="permissions-tabs">
    <a class="role tabs-bg" href="{:U('payment/paylist')}">支付方式</a>
    <a class="keeper" href="{:U('system/transaction')}">交易设置</a>
</div>
<div class="permissions-content">
    <div class="permissions-le">
        <div class="permissions-table">
            <table border="0" width="100%">
                <thead>
                <tr>
                    <td width="10%">支付方式</td>
                    <td>支付介绍</td>
                    <td>开发者</td>
                    <td>操作</td>
                </tr>
                </thead>
                <tbody class="trade-setting">
                <foreach name="payments" item="pay">
                    <tr>
                        <td>{$pay['p_name']}</td>
                        <td>{$pay.p_desc}</td>
                        <td>{$pay.p_team}</td>
                        <td>
                            <if condition="$pay['installed'] eq 1">
                                <a class="btn btn-blue" href="{:U('Payment/pay_edit',array('id'=>$pay['p_id']))}">编辑</a>
                                <a class="btn btn-red" data-url="{:U('Payment/pay_uninstall',array('id'=>$pay['p_id']))}" onclick="delRegion(this);">卸载</a>
                                <else/>
                                <a class="btn btn-green" href="{:U('Payment/pay_install',array('id'=>$pay['p_id']))}">安装</a>
                            </if>
                        </td>
                    </tr>
                </foreach>
                </tbody>
            </table>
            {$page}
        </div>
    </div>
    <div class="permissions-ri">
        <a href="" class="permissions-help">帮助和服务</a>
    </div>
</div>
<script type="text/javascript">
    function delRegion(obj){
        layer.confirm('确定卸载此方式？', {icon: 3, title:'卸载提示'}, function(index){
            layer.close(index);
            window.location.href = $(obj).data('url');
        });
    }
</script>
<include file="common:__foot__"/>